
#include <stdio.h>
#include <stdlib.h>

int main()
{

    // int i = 0b1011;   // 10进制的11
    // i = i | (1 << 2); // i = 0b1111

    // printf("i = %d\n", i); // 10进制的15

    //return 0; // Return 0 to indicate successful execution of the program. 
    // This is a common practice in C programs to signal that the program has completed its execution without any errors. 
    // In this case, the program is returning 0, which is a convention used to indicate success. If the program encounters an error or exception,
    //  it might return a non-zero value

    //IO专题
    // 1. 输入输出
    // 2. 文件操作

    int f1 = 0;
    int f2 = 1;
    int i;
    
 


    printf("第1项是 %d\n第2项是 %d\n", f1, f2); 

    for(i = 3; i <= 40; i++){
        int temp = f2;
        f2 = f1+f2;
        f1 = temp;
        printf("第%d项是%d\n", i, f2);

    }




    char str[32] = "hello world";
    printf("%s\n", str); // 输出 str = hello world
    printf("%.5s\n",str); // 输出 str = hello 只输出5个字符

    printf("%10.5s\n",str);
    printf("%-10.5s\n",str);  // 输出 str = hello      左对齐，右补空格

    printf("%*.*s\n",10,5,str); // 输出 str = hello      左对齐，右补空格  第一个参数是宽度，第二个参数是精度，第三个参数是字符串
    exit(0); // Return 0 to indicate successful execution of the program. This is a common practice in C programs to signal that the program has completed its execution without any errors. In this case, the program is returning 0, which is a convention used to indicate success. If the program encounters an error or exception, it might return a non-zero value.



}